package com.xxl.job.core.biz;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.biz.model.XxlJobParam;

public interface XxlJobBiz {

    /**
     * add job
     *
     * @param jobInfo
     * @return
     */
    public ReturnT<String> add(XxlJobParam jobInfo);

    /**
     * update job
     *
     * @param jobInfo
     * @return
     */
    public ReturnT<String> update(XxlJobParam jobInfo);

    /**
     * remove job
     * 	 *
     * @param id
     * @return
     */
    public ReturnT<String> remove(int id);

    /**
     * start job
     *
     * @param id
     * @return
     */
    public ReturnT<String> start(int id);

    /**
     * stop job
     *
     * @param id
     * @return
     */
    public ReturnT<String> stop(int id);

    /**
     * validate job
     *
     * @param id
     * @return
     */
    public ReturnT<String> validate(int id);

    /**
     * validate group
     *
     * @param appName
     * @return
     */
    public ReturnT<String> getGroupId(String appName);


}
